package com.ruoyi.generator.mapper;

import com.ruoyi.generator.entity.*;
import com.ruoyi.generator.entity.dto.CustomerExportVo;

import java.util.List;
import java.util.Map;

/**
 * 业务字段 数据层
 * 
 * @author ruoyi
 */
public interface CustomerMapper
{


    /**
     * 新增业务字段
     * 
     * @param Customer
     * @return 结果
     */
    public int insertCustomer(Customer Customer);
    public int updateCustomerByCode(Customer Customer);

    List<Customer> selectCustomerList(CustomerSearchCriteria CustomerSearchCriteria);

    String getMaxCustomerNumber();

    Customer selectCustomerByCode(Customer customer);


    int addVisit(CustomerVisit customerVisit);

    List<CustomerVisit> selectCustomerVisitList(CustomerVisitSearchCriteria customerVisitSearchCriteria);

    int updateVisit(CustomerVisit customerVisit);

    Long selectInvoiceMaxId();

    void insertCustomerInvoice(CustomerInvoice customerInvoice);
    CustomerInvoice queryCustomerInvoiceByCustomerCode(String clientName);
    CustomerInvoice queryCustomerInvoiceByClientName(String clientName);

    List<Customer> queryMesBycustomerName(String customerName);

    void insertContacts(Contacts contact);

    String queryStartDateByContractNumber(String contractCode);

    List<Contacts> selectContacts(String customerCode);

     void updateCustomerInvoice(CustomerInvoice customerInvoice);

    Contacts selectContactsById(String customerCode);


    void UpdateContacts(Contacts contact);

    /**
     * 更新联系人状态为未删除
     * 
     * @param params 包含 ids 和 customerId 的 Map 或自定义对象
     */
    void UpdateContactsById(Map<String, Object> params);

    void UpdateContactsByCustomerId(String customerId);

    List<ExportCustomer> exportCustomerList(CustomerExportSearchCriteria customerSearchCriteria);


    List<CustomerExportVo> selectCustomerVoList(CustomerExportSearchCriteria customerExportSearchCriteria);
}
